package cn.stylefeng.guns.modular.system.mapper;

import cn.stylefeng.guns.modular.system.entity.IndentOrder;
import cn.stylefeng.guns.modular.system.model.params.IndentOrderParam;
import cn.stylefeng.guns.modular.system.model.result.IndentOrderResult;
import cn.stylefeng.guns.modular.system.model.result.resultVO.IndentOrderVO;
import cn.stylefeng.guns.modular.system.model.result.resultVO.IndentVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订货单 Mapper 接口
 * </p>
 *
 * @author 小飞
 * @since 2019-07-02
 */
@Repository
public interface IndentOrderMapper extends BaseMapper<IndentOrder> {

    /**
     * 获取列表
     *
     * @author 小飞
     * @Date 2019-07-02
     */
    List<IndentOrderResult> customList(@Param("paramCondition") IndentOrderParam paramCondition);

    /**
     * 实例id集合
     */
    IndentOrderResult getByProcessInstanceId(@Param("processInstanceId") String processInstanceId);

    /**
     * 获取map列表
     *
     * @author 小飞
     * @Date 2019-07-02
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") IndentOrderParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author 小飞
     * @Date 2019-07-02
     */
    Page<IndentOrderVO> customPageList(@Param("page") Page page, @Param("paramCondition") IndentOrderParam paramCondition,@Param("id") Long id);

    Page<IndentOrderVO> getIndentByDealer(@Param("page") Page page,@Param("dealer") Long dealer);
    /**
     * 获取分页map列表
     *
     * @author 小飞
     * @Date 2019-07-02
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") IndentOrderParam paramCondition);



    Page<IndentVO> selectIndentList(@Param("page") Page page,@Param("userId")Long userId,@Param("code") Integer code);
}
